package com.farm.dao;

import com.github.pagehelper.Page;
import com.farm.domain.Produce;
import com.farm.domain.ProduceGrowUp;
import com.farm.domain.ProduceImg;
import com.farm.domain.ProduceType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProduceDao {

    public Page<Produce> getAllProduce();

    public Page<Produce> getProduceChooseType(String produceType);

    public Page<Produce> searchProduce(@Param("searchName") String searchName);

    public Integer imsertProduceImg(ProduceImg produceImg);

    public Integer deleteImg(String fileName);

    public Integer addProduce(Produce produce);

    public Integer deleteProduce(String uuid);

    public List<ProduceImg> selectAllImg(String uuid);

    public List<Produce> getMerchantProduce(String merchantID);

    public List<ProduceImg> getMerchantProduceImg(String produceID);

    public Produce getProduceInfo(@Param("produceID") String produceID, @Param("status") String status);

    public Integer updateProduceDetail(Produce produce);

    public Integer addProduceGrowup(ProduceGrowUp produceGrowUp);

    public List<ProduceGrowUp> getProduceGrowUp(@Param("uuid") String uuid, @Param("growUp") String growUp);

    public List<ProduceType> getProduceType();

    public Integer updateStatus(String uuid);

    public Integer delProduceGrow(String uuid);
}
